<?php
namespace app\shop\home;

use app\index\controller\Home;
use app\shop\model\ArtworkGroup;
use app\shop\model\Single;
/**
 * 前台公共控制器
 * @package app\cms\admin
 */
class Common extends Home
{
    protected function _initialize()
    {
        parent::_initialize();
        $user = session("auction_user");
        $types = ArtworkGroup::with('getimgpath')->select();
        //单页
        $singleType = [
            ['id'=>1,'type'=>'常见问题'],
            ['id'=>2,'type'=>'销售艺术'],
            ['id'=>3,'type'=>'专业服务'],
            ['id'=>4,'type'=>'会员中心'],
        ];
        $single = Single::order('type asc ,sort asc')->column('id,type,title');
        $this->assign('singleType', $singleType);
        $this->assign('single', $single);
        $this->assign('types', $types);
        $this->assign('user', $user);
    }
}